﻿CREATE TABLE [dbo].[HospInfoVar] (
    [Id]             INT            IDENTITY (1, 1) NOT NULL,
    [Key]            NVARCHAR (50)  NOT NULL,
    [Type]           NVARCHAR (50)  NOT NULL,
    [Description]    NVARCHAR (500) NULL,
    [DefaultTitle]   NVARCHAR (200) NULL,
    [DefaultContent] NTEXT          NULL,
    [Usage]          NVARCHAR (50)  NOT NULL,
    [RecStatus]      INT            NOT NULL,
    [RecCreateDt]    DATETIME       NOT NULL,
    [RecUpdateDt]    DATETIME       NULL,
    [RecDeleteDt]    DATETIME       NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医院综合信息可用变量表', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'变量名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'Key';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'变量类型(枚举，pureText：纯文本；htmlText：html文本；pageUrl：页面url地址；imageUrl：图片url地址；singleEnum：单项枚举;multiEnum:复合枚举；subKeyList：子键列表jsonArray格式)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'Type';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'变量描述', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'Description';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'默认标题', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'DefaultTitle';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'默认内容', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'DefaultContent';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'作用域，取值范围： Hosp , Dept , Dr', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'Usage';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录状态, 1：正常；2：删除', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'RecStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'RecCreateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录上次修改时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'RecUpdateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录删除时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospInfoVar', @level2type = N'COLUMN', @level2name = N'RecDeleteDt';

